<?php
/**
 * Created by PhpStorm.
 * User: Fan
 * Date: 2018/8/13
 * Time: 23:03
 */

namespace Modules\News;


use Houdunwang\WeChat\WeChat;
use Modules\News\Entities\Newsreply;

class Respons
{
    public function handle($data){
        $instance = WeChat::instance('message');
        //通过对应规则数据找到newsreply表中的回复数据
        $news = json_decode(Newsreply::where('rule_id',$data['id'])->first()->data,true);

        return $instance->news($news);
    }
}